As an important part of the modern information science & technology and a core of computer data processing and information management systems, database technology allows effective organization and storage of mass data during the computer information processing. Use of the database technology may reduce data storage redundancy, realize data sharing, ensure data security, and efficiently retrieve and process data. To ensure the security of important data in a database of certain equipment, a mechanism of master-slave devices may be employed so that data backup for the database of the master device may be accomplished in the slave device. Because the long-time running of the master device may result in the inconsistency of data in both the master device and the slave device, it is very important to verify the consistency of data in both the master device and the slave device.
During the consistency verification of data in a master device and a slave device, the characteristic values of data in both the master device and the slave device are acquired from the master device and the slave device by commands (for example, by a checksum table) in the structured query language, and then the characteristic values of the master device and the slave device are compared with each other to find whether they are identical. If identical, it is determined that data in both the master device and the slave device are consistent; and if not, data in both the master device and the slave device are inconsistent.
The above verification process implements consistency verification by a great number of commands in the structured query language, this will result in lots of read/write operations to a disk and occupy more system resources, thus it is disadvantageous for the master device to process services in real time; in addition, it can be determined only whether the data in both the master device and the slave device are consistent by comparison, and the specific inconsistent data cannot be found, so the accuracy of verification is poor.